package br.com.firula.bo.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import br.com.firula.bo.TimeBO;
import br.com.firula.dao.TimeDAO;
import br.com.firula.to.TimeTO;

@SuppressWarnings("unchecked")
@Service("timeBO")
public class TimeBOImpl extends GenericBOImpl implements TimeBO {

    @Autowired
    public void setTimeDAO(TimeDAO dao) {
        this.dao = dao;
    }

    public TimeBOImpl(){
    	setType("br.com.firula.to.TimeTO");
    }

    public TimeTO getTimeById(String id) {
    	return (TimeTO)get(id);
    }

    public TimeTO getTimePorNome(String nome){
    	return ((TimeDAO)dao).getTimePorNome(nome);
    }

    public List<TimeTO> getTodosTimes(){
    	return ((TimeDAO)dao).getTodosTimes();
    }
}